class Eth::Contracts::<%= contract_name.classify %>Controller < ApplicationController
  protect_from_forgery :except => :index

  def index
  end

<%contract_abi.each do |abi|%>
    <%if abi['type'] == 'function' #and abi['constant'] == false%>
  def <%=abi['name'].underscore%>
    input_args = params[:contract_input]
    if input_args.nil?
      msg = <%= contract_name.classify %>.<%=abi['name']%>
    else
      msg = <%= contract_name.classify %>.<%=abi['name']%>(*input_args)
    end
    redirect_to url_for(:action => :index, :msg_<%=abi['name'].underscore%> => msg)
  end

    <%end%>
<%end%>
end
